home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / prg_casm / snip9611.zip / LLD_BLOB.H < prev    next >
C/C++ Source or Header  |  1996-11-24  |  3KB  |  60 lines

  1. /* +++Date last modified: 02-Nov-1995 */
  2.  
  3. /* =======================================================================
  4.     LLD_BLOB.h      Generic Doubly Linked List for Binary Large OBjects.
  5.                     Linked Lists for variable size data-items.
  6.  
  7.                     v1.00  94-08-11
  8.  
  9.                     - Based on the LLD module for fixed size data-items.
  10.                     - Use the functions in the LLD module for operations
  11.                       not specific to Blobs. You can use LLDnodePtr() to
  12.                       obtain a pointer to the stored Blob.
  13.                     - Note that From and To suffixes to function names are
  14.                       implied in the Blob data related functions.
  15.  
  16.  _____              This version is Public Domain.
  17.  /_|__|             A.Reitsma, Delft, The Netherlands.
  18. /  | \  --------------------------------------------------------------- */
  19.  
  20. #ifndef LLD_BLOB__H
  21. #define LLD_BLOB__H
  22.  
  23. /* ---- LL blob system management and maintenance --------------------- */
  24.  
  25. int  LLDblobCreate( void );
  26.                         /* returns list number to use or -1 on failure. */
  27.                         /* MUST be called before using a list of blobs. */
  28.  
  29. /* ---- Node management --------------------------------------------------
  30.    Functions changing current node pointer to the new node.
  31.    A return value of -1 indicates a memory allocation problem.
  32. */
  33. int  LLDblobInsert( int List, void * Source, unsigned Size );
  34.                                           /* insert BEFORE current node */
  35. int  LLDblobAdd( int List, void * Source, unsigned Size );
  36.                                           /* insert AFTER current node  */
  37.  
  38. /* Functions NOT changing the current node pointer.
  39.    Especially intended for implementation of Queue's and Stacks.
  40. */
  41. int  LLDblobPrepend( int List, void * Source, unsigned Size );
  42.                                                 /* insert as first node */
  43. int  LLDblobAppend( int List, void * Source, unsigned Size );
  44.                                                 /* insert as last node  */
  45.  
  46. void LLDblobDelete( int List );
  47.         /* remove current node and free() the data.                     */
  48.         /* current node ptr moved to next node. UNLESS the deleted node */
  49.         /* was the last node: then current ptr moved to previous node   */
  50.  
  51. /* ---- stored data management -------------------------------------------
  52.    'return' typeless data. The return value is the size of the data.
  53.    The data is transferred to Destination.
  54.    If 'Destination' is NULL, the only action is returning the size.
  55. */
  56. unsigned LLDblobData( int List, void * Destination );
  57.  
  58. #endif /* LLD_BLOB__H */
  59. /* ==== LLD_BLOB.h  end =============================================== */
  60.